package com.example.demo.web;

import com.example.demo.config.RoomProperties;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 作者: 谢韬元
 * 日期: 2025/1/17
 * 类名: RoomController
 */
@RestController
@RequestMapping("/room")
public class RoomController {

    private final RoomProperties roomProperties;

    public RoomController(RoomProperties roomProperties) {
        this.roomProperties = roomProperties;
    }

    @GetMapping("/info")
    public RoomProperties getRoomInfo() {
        System.out.println(roomProperties.getAddr());
        return roomProperties;
    }
}
